import axios from "axios";
import { baseUrl } from "./config";

// 获取轮播图
export function banner() {
  return axios({
    url: `${baseUrl}/banner`,
  });
}

// 获取推荐歌单
export function playlist() {
  return axios({
    url: `${baseUrl}/personalized?limit=24`,
  });
}

// 获取推荐新音乐

export function newmusic() {
  return axios({
    url: `${baseUrl}/personalized/newsong`,
  });
}

// 获取推荐歌手

export function singer() {
  return axios({
    url: `${baseUrl}/top/artists?offset=0&limit=30`,
  });
}

// 获取歌单详情
export function playlistitem(id) {
  return axios({
    url: `${baseUrl}/playlist/detail?id=` + id,
  });
}

// 获取歌单收藏着
export function likeplaylist(id) {
  return axios({
    url: `${baseUrl}/playlist/subscribers?id=` + id + `&limit=28`,
  });
}

// 相关歌单推荐
export function recommend(id) {
  return axios({
    url: `${baseUrl}/related/playlist?id=` + id,
  });
}

// 获取歌单评论
export function comment(id) {
  return axios({
    url: `${baseUrl}/comment/playlist?id=` + id,
  });
}

// 获取云音乐特色排行榜

export function GetTop1() {
  return axios({
    url: `${baseUrl}/toplist`,
  });
}

// 获取热门标签
export function Tags() {
  return axios({
    url: `${baseUrl}/playlist/hot`,
  });
}

// 获取歌单

export function songlist() {
  return axios({
    url: `${baseUrl}/top/playlist?limit=200`,
  });
}

// 获取MV

export function MVlist() {
  return axios({
    url: `${baseUrl}/mv/all?area=全部?limit=50`,
  });
}

// 获取mv数据

export function MVdetail(id) {
  return axios({
    url: `${baseUrl}/mv/detail?mvid=` + id,
  });
}
// 获取mv地址
export function Mvurl(id) {
  return axios({
    url: `${baseUrl}/mv/url?id=` + id + `&r=1080`,
  });
}

// 获取mv评论

export function Mvcomment(id) {
  return axios({
    url: `${baseUrl}/comment/mv?id=` + id,
  });
}

// 获取相似MV
export function SimilarMV(id) {
  return axios({
    url: `${baseUrl}/simi/mv?mvid=` + id,
  });
}

// 获取歌曲url
export function musicurl(id) {
  return axios({
    url: `${baseUrl}/song/url?id=` + id,
  });
}
